fp-package

(c) Michael Mehlich and Denis Girou, 1994, 1995

(current) e-mail: mehlich@informatik.uni-muenchen.de

Fixed point arithmetic for TeX with numbers ranging from -999999999999999999.999999999999999999 to +999999999999999999.999999999999999999

USAGE: - LaTeX2e: where the following options are known: nomessages: don't print messages about the functions that are just computed debug: print debug messages (mainly for ) - LaTeX2.09: include lfp.sty in the document preamble, i.e. - TeX: =

@in@ fp.texfp.tex, =.sty tempbfp fortempa:=fp.tex tempatempb @in@ @in@fp

`=

FILES AND THEIR CONTENTS: - readme.fp: this file - fp.sty includes all files - defpattern.sty: only for internal usage - fp-basic.sty: The following macros are public ones to be used in the document: #1#2#3 #1#2#3 #1#2#3 #1#2#3 #1#2 #1#2 #1#2......#1#2......#1#2......#1 ......#1 ......#1......#1 ............- fp-exp.sty: The following macros are public ones to be used in the document: #1#2 #1#2 #1#2#3 #1#2#3 - fp-random.sty The following macros are public ones to be used in the document: =#1 #1 - fp-pas.sty The following macros are public ones to be used in the document: #1#2 - fp-snap.sty: The following macros are public ones to be used in the document: #1#2#3 #1#2#3 #1#2 - fp-trigo.sty: The following macros are public ones to be used in the document: #1#2 #1#2 #1#2#3 #1#2 #1#2 #1#2#3 #1#2 #1#2 #1#2#3 #1#2 #1#2 #1#2#3 - fp-upn.sty: The following macros are public ones to be used in the document: #1#2 upn-expression #2 Known operations are: +,-,*,/,abs,neg,round,trunc,clip,e,exp,ln,pow,root,pi,sin,cos, sincos,tan,cot,tancot,arcsin,arccos,arcsincos, arctan,arccot,arctancot,pop,swap,copy where pop removes the top element swap exchanges the first two elements copy copies the top element Example: The macro call -0.0617 2.5 + 17.5 - 2 1 + * 2 swap / is equivalent to -0.06:= ((17.5 - (17 + 2.5)) * (2 + 1)) / 2 and evaluates to Afterwards the macro call -0.06-0.06 -1 * 0.2 + sin 2 round `the "" is necessary! is equivalent to -0.06:= round_2(sin((-0.06* -1) + 0.2)) and evaluates to

KNOWN BUGS: - does not work with multido.sty/multido.tex Reason: multido uses the same macro names and Recommended Solution: Patch multido.tex, i.e. apply the following substitutions: FPadd -> mdo@FPadd FPsub -> mdo@FPsub

HISTORY: Date By File New Version

Feb. 18, 1995 Michael Mehlich fp-upn.sty V2.0 added debug messages for fp-upn.sty (recommended by Denis Girou)

Feb. 18, 1995 Michael Mehlich fp.sty V0.7 added fp-random.sty to list of required packages

Feb. 18, 1995 Michael Mehlich fp-basic.sty V1.2 printing fp-messages is conditional only (default: true) introduced macro for printing debug messages (default: do not print) (recommmended by Denis Girou)

Feb. 18, 1995 Michael Mehlich fp-exp.sty V0.7c corrected bugs in @pow and @root writing messages to ordinary text (reported by Denis Girou)

Feb. 17, 1995 Denis Girou fp-random.sty V1.0

Feb. 17, 1995 Michael Mehlich fp-basic.sty V1.1f corrected @strip introduced in version V1.1e as it has to but did not hande + and -

Feb. 17, 1995 Michael Mehlich fp-basic.sty V1.1e corrected @strip introduced in version V1.1d as it has to but did not hande empty parameters

Feb. 17, 1995 Michael Mehlich fp-basic.sty V1.1d bug in scanning numbers by @readvalue in connection with number-macros of corrected (thanks for Denis Girou reporting this bug)

Nov. 19, 1994 Michael Mehlich fp.sty V0.6 package date changed

Nov. 19, 1994 Michael Mehlich fp-basic.sty V1.1c bug in @correctintcounter corrected

Nov. 19, 1994 Michael Mehlich fp-upn.sty V1.1 handling of arctan, arccot, arctancot added

Nov. 19, 1994 Michael Mehlich fp-trigo.sty V0.9a , , added

Oct. 27, 1994 Michael Mehlich lfp.sty - introduced

Oct. 27, 1994 Michael Mehlich fp.tex - introduced

Oct. 15, 1994 Michael Mehlich readme.fp - this history changed for better readability

Oct. 15, 1994 Michael Mehlich fp-exp.sty V0.7b subtraction bug in @@exp corrected

Oct. 15, 1994 Michael Mehlich fp-basic.sty V1.1b subtraction in @counttimes changed

Oct. 15, 1994 Michael Mehlich fp-trigo.sty V0.7b error message, if @modtwopi does not lead to correct result (this shouldn't be possible) subtraction in @@cos corrected

Oct. 12, 1994 Michael Mehlich fp.sty V0.5b prevent files included from sending messages

Oct. 12, 1994 Michael Mehlich readme.fp - changed entry for defpattern.sty in this history to reflect original source for defpattern.sty

Oct. 12, 1994 Michael Mehlich defpattern.sty - source notice in message corrected

Oct. 12, 1994 Michael Mehlich fp-exp.sty - start message for changed

Oct. 12, 1994 Michael Mehlich fp-trigo.sty - unnecessary emoved

Oct. 3, 1994 Michael Mehlich, fp.sty V0.5 additional styles included by fp.sty

Oct. 3, 1994 Michael Mehlich fp-upn.sty V1.0 first version

Oct. 3, 1994 Michael Mehlich defpattern.sty - modification of the -macro in TeX and TUG NEWS from an article by Alan Jeffrey no version number, no copyright (public domain) TeX and TUG News 2(2) writes in the section "Mission Statement": "The entire contents of this newsletter are being placed in the public domain."

Oct. 3, 1994 Michael Mehlich fp-basic.sty V1.1 bug in corrected

Aug. 29, 1994 Michael Mehlich fp.sty V0.3 additional styles included by fp.sty

Aug. 29, 1994 Michael Mehlich fp-trigo.sty V0.7 first version

Aug. 29, 1994 Michael Mehlich fp-pas.sty V1.0 first version

Aug. 29, 1994 Michael Mehlich fp-exp.sty V0.7 first version

Aug. 12, 1994 Michael Mehlich fp.sty V0.2 first version

Aug. 10, 1994 Michael Mehlich fp-snap.sty V1.0 first version

Apr. 20, 1994 Michael Mehlich fp-basic.sty V1.0 added

Apr. 12, 1994 Michael Mehlich fp-basic.sty V0.99 division algorithm added

Feb. 03, 1994 Michael Mehlich fp-basic.sty V0.8 all macros are completely rewritten to be able to use an increased range of numbers

Jan. 18, 1994 Michael Mehlich fp-basic.sty V0.2 bug in @store corrected

Jan. 17, 1994 Michael Mehlich fp-basic.sty V0.1 the file realcalc.tex V1.0, (C) Frank Buchholz has been renamed to fp-basic.sty V0.1 with all macros renamed, trunc removed

COPYING: - Permission to use, copy, modify, and distribute this software and its documentation for any purpose and without fee is hereby granted, provided that the above copyright notice, the above history with your modifications added, and this permission notice appear in all copies and modified versions. - The copyright holder disclaim all warranties with regard to this software, including all implied warranties of merchantability and fitness, in no event shall the copyright holder be liable for any special, indirect or consequential damages or any damages whatsoever resulting from loss of use, data or profits, whether in an action of contract, negligence or other tortious action, arising out of or in connection with the use or performance of this software.;''